package com.bolao;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.TextView;

import com.Adapter.MatchAdapter;
import com.entidades.Match;

public class MatchBetsFragment extends Fragment {

	private ListView matchView;
	private TextView name;


	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View rootView = inflater.inflate(
		
		R.layout.match_fragment, container, false);
		matchView = (ListView) rootView.findViewById(R.id.listView1);
		name = (TextView) rootView.findViewById(R.id.textViewMatchs);
		name.setText(R.string.first_phase);
		MatchAdapter matchAdapter = new MatchAdapter(container.getContext(), Match.getGroupMatchs(), true);
		matchView.setAdapter(matchAdapter);
 
		matchView.setOnItemClickListener(new OnItemClickListener(){
		
			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				
			}
			
		});
		
		return rootView;
	}
}
